From: Richard M. Stallman Date: Fri, 1 Feb 2002 04:34:21 +0000 (+0000) Subject: (decode_composition_emacs_mule): X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~58995 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b1887814c31f69bfa5620e16ade245a1650046b3;p=emacs.git (decode_composition_emacs_mule): Give up if NCOMPONENT gets too large to index `component'. --- diff --git a/src/coding.c b/src/coding.c index 88ff0ca0a83..37a5e886547 100644 --- a/src/coding.c +++ b/src/coding.c @@ -811,6 +811,10 @@ decode_composition_emacs_mule (coding, src, src_end, return 0; for (ncomponent = 0; src < src_base + data_len; ncomponent++) { + /* If it is longer than this, it can't be valid. */ + if (ncomponent >= COMPOSITION_DATA_MAX_BUNCH_LENGTH) + return 0; + if (ncomponent % 2 && with_rule) { ONE_MORE_BYTE (gref);